public class Main20250324 {
}

class Solution {
    public int countPrefixes(String[] words, String s) {
        int res = 0;
        for (int i = 0; i < words.length; i++) {
            if (s.startsWith(words[i])) {
                res++;
            }
            if (s.indexOf(words[i]) == 0) {
                res++;
            }
        }
        return res;
    }
}